/*
 * @Author: cgl
 * @Date: 2023-04-19 14:57:57
 * @LastEditors: liangkun 2669681641@qq.com
 * @LastEditTime: 2023-11-17 15:22:49
 * @FilePath: \radiation-hygiene-fe\src\api\resourse\equipment.js
 * @Description: 
 * 
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved. 
 */
import request from '@/utils/request'

// 查询设备分页列表
export function equipmentList(data = {}) {
  // data['pageSize'] = 1000;
  return request({
    url: '/basic/equipment/list',
    method: 'post',
    data,
  })
}
// 导出设备列表
export function equipmentExport(data) {
  return request({
    url: `/basic/equipment/export`,
    method: "post",
    data,
  });
}
// 查询设备列表
export function equipmentListing(params) {
  return request({
    url: '/basic/equipment/listing',
    method: 'get',
    params,
  })
}
// 获取设备详细信息
export function equipmentDetail(equipmentId) {
  return request({
    url: '/basic/equipment/getInfo/' + equipmentId,
    method: 'get'
  })
}
// 新增设备
export function equipmentAdd(data) {
  return request({
    url: `/basic/equipment/add`,
    method: "post",
    data,
  });
}
// 修改设备
export function equipmentEdit(data) {
  return request({
    url: '/basic/equipment/edit',
    method: 'post',
    data,
  })
}
// 删除设备
export function equipmentDelete(equipmentIds) {
  return request({
    url: '/basic/equipment/remove/' + equipmentIds,
    method: 'get'
  })
}
// 验收申请
export function checkAcceptApply(data) {
  return request({
    url: '/basic/equipment/checkAcceptApply',
    method: 'post',
    data,
  })
}

// 查询主设备列表
export function listingEffectiveEquipment() {
  return request({
    url: '/basic/equipment/listingEffectiveEquipment',
    method: 'get',
  })
}
// 查询绑定状态(已绑定、未绑定)设备列表
export function listingBindEquipment(id, isBind) {
  return request({
    url: `/basic/equipment/listingBindEquipment/${id}/${isBind}`,
    method: 'get',
  })
}
// 绑定设备
export function toolboxBindEquipment(data) {
  return request({
    url: `/basic/equipment/toolbox/add`,
    method: 'post',
    data: data
  })
}
// 电离室类型R50
export function xRayType() {
  return request({
    url: `/basic/equipment/dict/xRay`,
    method: 'get',
  })
}
// 电离室类型TRP
export function trpRayType() {
  return request({
    url: `/basic/equipment/dict/electronWire`,
    method: 'get',
  })
}